<?php

namespace Admin\Controller;

use Think\Controller;

class PublicController extends Controller
{

    //退出登录
    public function logout()
    {
        if(is_login()){
            session(C('USER_AUTH',null));
            session('[destroy]');
            redirect(U('Login/index'));
        } else {
            redirect(U('Login/index'));
        }
    }



    //生成验证码

    public function verify()
    {
        $config = array('length'=>4,'fontSize'=>100);
        $verify = new \Think\Verify($config);
        $verify->entry(1);
    }

}